@import '../variables/header';

@mixin euiHeaderAffordForFixed($headerHeight: $euiHeaderHeightCompensation) {
  // The `&` allows for grouping inside another specific body class.
  // When not applied inside of another selector, it simply renders with the single class
  &.euiBody--headerIsFixed {
    padding-top: $headerHeight;

    // When the EuiHeader is fixed, we need to account for it in the position of the flyout
    .euiFlyout,
    .euiCollapsibleNav {
      top: $headerHeight;
      height: calc(100% - #{$headerHeight});
    }
  }
}
